
  #include <cstdio>
  #include <cstring>
  #include <cmath>
  #include <stdlib.h>
  #include <time.h>
  #include <algorithm>
  
  using namespace std;
  
  int N = 500000;
  int K = 10;
  int Rw = 100000;
  int Rv = 100;
  int Ra = 10000;
  int Rc = 100;
  
  int main(int argc, char *argv[])
    {
	if (argc > 1) N = atoi(argv[1]);
	if (argc > 2) K = atoi(argv[2]);
	if (argc > 3) Rw = atoi(argv[3]);
	if (argc > 4) Rv = atoi(argv[4]);
	if (argc > 5) Ra = atoi(argv[5]);
	if (argc > 6) Rc = atoi(argv[6]);

       srand(20090728);
       //freopen("resource.in", "w", stdout);
         printf("%d %d\n", N, K);
	 for (int i = 0; i < N; ++ i)
	   printf("%d %d %d %d\n", rand() % Rw + 1, rand() % Rv + 1, rand() % Ra + 1, rand() % Rc + 1);
       return 0;
    }
  